using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using OBUCare.Core.Models.Mapping;
using OBUCare.Core.Models;

namespace OBUCare.Core.DataAccess
{
    public partial class OBU_CAREContext : DbContext
    {
        static OBU_CAREContext()
        {
            Database.SetInitializer<OBU_CAREContext>(null);
        }

        public OBU_CAREContext()
            : base("Name=OBU_CAREContext")
        {
        }

        public DbSet<DICT_TYPE> DICT_TYPE { get; set; }
        public DbSet<DICT_TYPE_VALUE> DICT_TYPE_VALUE { get; set; }
        public DbSet<FUND_DETAIL> FUND_DETAIL { get; set; }
        public DbSet<FUND_INFO> FUND_INFO { get; set; }
        public DbSet<INVOICE_DETAIL> INVOICE_DETAIL { get; set; }
        public DbSet<INVOICE_INFO> INVOICE_INFO { get; set; }
        public DbSet<OPERATION_CARE_LOGS> OPERATION_CARE_LOGS { get; set; }
        public DbSet<PARTS_TYPE> PARTS_TYPE { get; set; }
        public DbSet<PRINT_DETAIL> PRINT_DETAIL { get; set; }
        public DbSet<PRINT_LIST> PRINT_LIST { get; set; }
        public DbSet<PRINT_LOG> PRINT_LOG { get; set; }
        public DbSet<RECEIVED_MESSAGE> RECEIVED_MESSAGE { get; set; }
        public DbSet<REPAIR_ORDER_ADJUST> REPAIR_ORDER_ADJUST { get; set; }
        public DbSet<REPAIR_ORDER_FAULT> REPAIR_ORDER_FAULT { get; set; }
        public DbSet<REPAIR_ORDER_PRICE> REPAIR_ORDER_PRICE { get; set; }
        public DbSet<REPAIR_ORDER_TRACKING> REPAIR_ORDER_TRACKING { get; set; }
        public DbSet<REPAIR_ORDERS> REPAIR_ORDERS { get; set; }
        public DbSet<REPAIR_TYPE> REPAIR_TYPE { get; set; }
        public DbSet<SENT_OUT_MESSAGE> SENT_OUT_MESSAGE { get; set; }
        public DbSet<TRANSFER_BILL_DETAIL> TRANSFER_BILL_DETAIL { get; set; }
        public DbSet<TRANSFER_BILLS> TRANSFER_BILLS { get; set; }        
        public DbSet<SUPPLIER> SUPPLIERS { get; set; }
        public DbSet<SPECS> SPECS { get; set; }
        public DbSet<View_OBU_Info> View_OBU_Info { get; set; }
        public DbSet<View_RepariOrders> View_RepariOrders { get; set; }
        public DbSet<View_Invoice_Info> View_Invoice_Info { get; set; }
        public DbSet<View_Transaction_Serial_Info> View_Transaction_Serial_Info { get; set; }
        public DbSet<View_Received_Returned_Money> View_Received_Returned_Money { get; set; }
        public DbSet<View_Operator_InvoiceInfos> View_Operator_InvoiceInfos { get; set; }
        public DbSet<View_TRANSFER_BILL_Info> View_TRANSFER_BILL_Info { get; set; }
        public DbSet<PARTS_SALE> PARTS_SALE { get; set; }
        public DbSet<PARTS_SPECS> PARTS_SPECS { get; set; }
        public DbSet<PARTS_SPECS_DETAIL> PARTS_SPECS_DETAIL { get; set; }
        public DbSet<PARTS_STOCK> PARTS_STOCK { get; set; }
        public DbSet<PARTS_TRANSFER> PARTS_TRANSFER { get; set; }
        public DbSet<SYSTEM_LOGS> SYSTEM_LOGS { get; set; }
        public DbSet<SUM_PARTS_STOCK> SUM_PARTS_STOCK { get; set; }
        public DbSet<View_Contract_Details> View_Contract_Details { get; set; }
        public DbSet<View_Contract_Details_ALL> View_Contract_Details_ALL { get; set; }
        public DbSet<View_PartsStock> View_PartsStock { get; set; }
        public DbSet<View_Parts_Transfer> View_Parts_Transfer { get; set; }
        public DbSet<View_PartsStockDetails> View_PartsStockDetails { get; set; }
        public DbSet<View_PARTS_SALE> View_PARTS_SALE { get; set; }
        public DbSet<View_OBU_INFO_BY> View_OBU_INFO_BY { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new DICT_TYPEMap());
            modelBuilder.Configurations.Add(new DICT_TYPE_VALUEMap());
            modelBuilder.Configurations.Add(new FUND_DETAILMap());
            modelBuilder.Configurations.Add(new FUND_INFOMap());
            modelBuilder.Configurations.Add(new INVOICE_DETAILMap());
            modelBuilder.Configurations.Add(new INVOICE_INFOMap());
            modelBuilder.Configurations.Add(new OPERATION_CARE_LOGSMap());
            modelBuilder.Configurations.Add(new PARTS_TYPEMap());
            modelBuilder.Configurations.Add(new PRINT_DETAILMap());
            modelBuilder.Configurations.Add(new PRINT_LISTMap());
            modelBuilder.Configurations.Add(new PRINT_LOGMap());
            modelBuilder.Configurations.Add(new RECEIVED_MESSAGEMap());
            modelBuilder.Configurations.Add(new REPAIR_ORDER_ADJUSTMap());
            modelBuilder.Configurations.Add(new REPAIR_ORDER_FAULTMap());
            modelBuilder.Configurations.Add(new REPAIR_ORDER_PRICEMap());
            modelBuilder.Configurations.Add(new REPAIR_ORDER_TRACKINGMap());
            modelBuilder.Configurations.Add(new REPAIR_ORDERSMap());
            modelBuilder.Configurations.Add(new REPAIR_TYPEMap());
            modelBuilder.Configurations.Add(new SENT_OUT_MESSAGEMap());
            modelBuilder.Configurations.Add(new TRANSFER_BILL_DETAILMap());
            modelBuilder.Configurations.Add(new TRANSFER_BILLSMap());
            modelBuilder.Configurations.Add(new View_OBU_InfoMap());
            modelBuilder.Configurations.Add(new SUPPLIERMap());
            modelBuilder.Configurations.Add(new SPECSMap());
            modelBuilder.Configurations.Add(new View_RepariOrdersMap());
            modelBuilder.Configurations.Add(new View_Invoice_InfoMap());
            modelBuilder.Configurations.Add(new View_Transaction_Serial_InfoMap());
            modelBuilder.Configurations.Add(new View_Received_Returned_MoneyMap());
            modelBuilder.Configurations.Add(new View_Operator_InvoiceInfosMap());
            modelBuilder.Configurations.Add(new View_TRANSFER_BILL_InfoMap());
            modelBuilder.Configurations.Add(new PARTS_SALEMap());
            modelBuilder.Configurations.Add(new PARTS_SPECSMap());
            modelBuilder.Configurations.Add(new PARTS_SPECS_DETAILMap());
            modelBuilder.Configurations.Add(new PARTS_STOCKMap());
            modelBuilder.Configurations.Add(new PARTS_TRANSFERMap());
            modelBuilder.Configurations.Add(new SUM_PARTS_STOCKMap());
            modelBuilder.Configurations.Add(new SYSTEM_LOGSMap());
            modelBuilder.Configurations.Add(new View_Contract_DetailsMap());
            modelBuilder.Configurations.Add(new View_Contract_Details_ALLMap());
            modelBuilder.Configurations.Add(new View_PartsStockMap());
            modelBuilder.Configurations.Add(new View_Parts_TransferMap());
            modelBuilder.Configurations.Add(new View_PartsStockDetailsMap());
            modelBuilder.Configurations.Add(new View_PARTS_SALEMap());
            modelBuilder.Configurations.Add(new View_OBU_INFO_BYMap());
        }
    }
}
